//
//  HudTool.m
//  SmartHomeSDK
//
//  Created by haimen_ios_imac on 2017/4/24.
//  Copyright © 2017年 深圳海曼科技有限公司. All rights reserved.
//

#import "HudTool.h"
#import "MBProgressHUD.h"

@implementation HudTool

+ (void)showHud:(NSString *)title
{
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:[UIApplication sharedApplication].keyWindow animated:YES];
    hud.removeFromSuperViewOnHide = YES;
    hud.animationType = MBProgressHUDAnimationZoom;
    hud.contentColor = [UIColor whiteColor];
    hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
    hud.mode = MBProgressHUDModeIndeterminate;
    hud.bezelView.color = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.6];
    hud.label.text = title;
}

+ (void)hideHud
{
    [MBProgressHUD hideHUDForView:[UIApplication sharedApplication].keyWindow animated:YES];
}


@end
